<template>
  <div>空白页</div>
</template>

<script>
export default {
  created:function() {
    this.test()
  },
  methods:{
    sleep(second, param) {
      return new Promise((resolve) => {
        setTimeout(() => {
          resolve(param);
        }, second);
      })
    },
    test: async function() {
      const p1 = await this.sleep(500,'p1 over')
      const p2 = await this.sleep(1000,`${p1}-p2 over`)
      console.log(p2)
    }
  }
}
</script>

<style scoped>

</style>
